/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2011.09.18                                          *
 *                                                                       *
 *************************************************************************/

namespace FreeMAPs
{

inline const std::string&
InitializationCondition::get_variable_complete_symbol() const
{
    return d_variable_complete_symbol;
}


inline const std::string&
InitializationCondition::get_ic_name() const
{
    return this->get_object_name();
}

//inline const Function* InitializationCondition::get_function()const
//{
//  return d_init_value;
//}

inline bool
InitializationCondition::require_initialization (
    const double time,
    const bool initial_time) const
{
    if (initial_time)
    {
        return true;
    }

    if (d_only_act_on_init)
    {
        return false;
    }
    else
    {
        if (time >= d_start_time && time <= d_end_time)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}


inline bool
InitializationCondition::is_level_set_considered() const
{
    return (!d_inside_level_sets.empty() || !d_outside_level_sets.empty());
}


inline void
InitializationCondition::set_init_value(const double init_value)
{
    d_init_value = init_value;
}



inline double
InitializationCondition::get_init_value() const
{
    return d_init_value;
}

} //namespace
